package me.zhengjie.pojo.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import me.zhengjie.pojo.entity.ExamRoom;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @author Long
 * @date 2021/6/30 10:50
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "ExamRoomDto", description = "新增考场Dto")
public class ExamRoomDto extends ExamRoom {

    @ApiModelProperty("开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "考试开始时间不可为空")
    private Date startTime;

    @ApiModelProperty("结束时间")
    @NotNull(message = "考试结束时间不可为空")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;
}
